# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kblog
pkgver=20.04.3
pkgrel=0
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://kontact.kde.org/"
pkgdesc="A blogging library for KDE"
license="GPL-2.0-or-later"
depends_dev="qt5-qtbase-dev kcoreaddons-dev kio-dev ki18n-dev kcalendarcore-dev syndication-dev kxmlrpcclient-dev"
makedepends="$depends_dev extra-cmake-modules"
source="https://download.kde.org/stable/release-service/$pkgver/src/kblog-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="d87e46f191cdced10189f6fe9996a94ca338b72a0bd0ce12034ea9146404d37255ab7cf217cd14b162674e4f1c1a5372c0bbcd2150e06b1da8d164f4cb7bcb77  kblog-20.04.3.tar.xz"
